package io.bdmc.modules.bss.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 路由快照 实体
 * </p>
 *
 * @author 黄露
 * @since 2021-05-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
// "DeviceRouteSnapshot对象", description = "路由快照")
public class DeviceRouteSnapshot extends Model<DeviceRouteSnapshot> {

  private static final long serialVersionUID = 1L;

  @TableId(value = "snapshot_id", type = IdType.AUTO)
  private Integer snapshotId;

  private Integer routeId;

  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private LocalDateTime dataTime;

  private String url;

  private String remark;

  @Override
  public Serializable pkVal() {
    return this.snapshotId;
  }

}
